export default function myInstanceOf(targetObj, origin) {
   if (origin === null) return false
   if (typeof targetObj !== 'object' && typeof targetObj !== 'function') return false
   if (typeof origin !== 'object' && typeof origin !== 'function') {
      throw new TypeError("Right-hand side of 'instanceof' is not an object")
   }
   let proto = Object.getPrototypeOf(targetObj)
   while(proto) {
        if (proto === origin.prototype) return true
        proto = Object.getPrototypeOf(proto)
   }
   return false
}